package com.wx.day07.Handler;


import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("handler")
public class HandlerController {

    //获取请求头User-Agent 返回给前端
    @GetMapping("show")
    public String show(@RequestHeader(value = "User-Agent") String userAgent){
        return userAgent;  //Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
    }
}
